<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>出库申请查询页面</title>
		<link rel="stylesheet" href="/bootstrap/bootstrap-5.3.3-dist/css/bootstrap.min.css" />
		<link rel="stylesheet" href="/css/ProductDesign/Formulate_design_composition_query%20.css" />
		<style type="text/css">
			
		</style>
	
	</head>
	<body style="background-color: #eeeeee;">
		<div style="border: 2px solid #dcdcdc;height: 700px;border-radius: 10px;margin: 10px;">
		<div class="headBox">
			<nav aria-label="breadcrumb">
			  <ol class="breadcrumb">
			  	<span style="color: blue;">您正在做的业务是：</span>
			    <li class="breadcrumb-item"><a href="#">库存管理</a></li>
			    <li class="breadcrumb-item"><a href="#">出库申请管理</a></li>
			    <li class="breadcrumb-item active" aria-current="page">出库申请查询</li>
			  </ol>
			</nav>
		<div>
		<div style="margin-bottom: 2px">
	        <div style="display: inline;margin-left: 95%;">
	            <button class="btn btn-primary" type="button" id="state">开始</button>
	        </div>
	    </div>
		<div id="bodyBox">
				<table id="tbl">
					<tr>
						<td class="col1">请输入申请单编号</td>
						<td class="col2"><input type="text" id="payId" name="payId"/></td>
					</tr>
					<tr>
						<td class="col1">请输入关键字</td>
						<td class="col2"><input type="text" id="keywords"  name="keywords"/></td>
					</tr>
					<tr>
						<td class="col1">请输入登记时间</td>
						<td class="col2"><input type="date" name="startDate"/>至<input type="date" name="endDate"/></td>
					</tr>
				</table>
			</div>
				</div>
		</div>
		</div>
		<script type="text/javascript" src="/js/jquery-3.7.0.min.js"></script>
		<script type="text/javascript" src="/bootstrap/bootstrap-5.3.3-dist/js/bootstrap.bundle.min.js"></script>
		<script type="text/javascript" src="/js/common.js"></script>
		<script type="text/javascript">
			$(function(){
				$('#state').on('click', function (){
					AddSessionStorage();
					window.location.href= "/s-pay/Inquiry_Warehouse-out_Application";
				})
			})
			function AddSessionStorage(){
				let payId = $('#payId').val();
				let keywords = $('#keywords').val();
				let startDate = $('input[name="startDate"]').val();
				let endDate = $('input[name="endDate"]').val();
				new Date(startDate)
				new Date(endDate)
				if (startDate > endDate) {
					alert('开始时间不能大于结束时间');
					return;
				}
				sessionStorage.setItem('payId', payId);
				sessionStorage.setItem('keywords', keywords);
				sessionStorage.setItem('startDate', startDate);
				sessionStorage.setItem('endDate', endDate);
			}
		</script>
	</body>
</html>
